<?php

/**
 * Laravel-admin - admin builder based on Laravel.
 * @author z-song <https://github.com/z-song>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 * Encore\Admin\Form::forget(['map', 'editor']);
 *
 * Or extend custom form field:
 * Encore\Admin\Form::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */

use Encore\Admin\Table;

Table::init(function (Table $table) {
    // 禁用导出
    $table->disableExport();

    $table->actions(function (Table\Displayers\Actions $actions) {
        // 禁用操作查看
        $actions->disableView();
    });
});

Encore\Admin\Form::init(function (Encore\Admin\Form $form) {

    $form->disableEditingCheck();
    $form->disableCreatingCheck();
    $form->disableViewCheck();

    $form->tools(function (Encore\Admin\Form\Tools $tools) {
        // 禁用表单查看按钮
        $tools->disableView();
        // 禁用表单删除按钮
        $tools->disableDelete();
    });
});
